<template>
    <div>
      <el-row>
        <el-col :span="16" :offset="4">
          <el-tabs @tab-click="handleClick" v-model="activeName">
            <el-tab-pane label="文章" name="/searchArticle"></el-tab-pane>
            <el-tab-pane label="文件" name="/searchFile"></el-tab-pane>
          </el-tabs>
          <el-card>
            <router-view/>

          </el-card>
        </el-col>
      </el-row>
    </div>
</template>

<script>
    export default {
        name: "Search",
      data(){
        return {
          // activeName: this.$route.path,
          searchName: '',
        }
      },
      methods: {
        handleClick(tab, event) {
          this.$router.push(tab.name + "/" + this.searchName)
        }
      },
      created() {
        this.searchName = this.$route.params.name
      }
    }
</script>

<style scoped>

</style>
